﻿using Fuse8.DomainFramework.Practices.Domain.Interfaces;

namespace Fuse8.DomainFramework.Practices.DataAccess.Commands
{
	public class BaseCommandNameFactory : ICommandNameFactory
	{
		public virtual string GetCommandName<TDomain, TParameter>()
		{
		    var domainType = typeof(TDomain);
            return string.Format("{0}_{1}{2}", GetProcedurePrefix(), domainType.Name, typeof(TParameter).Name.Replace("CommandParameter", ""));
		}

		protected virtual string GetProcedurePrefix()
		{
			return "cusp";
		}
	}
}